package form;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.SystemColor;
import java.awt.Toolkit;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import java.awt.BorderLayout;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;


public class WindowFormAbout {
	public JFrame frame;
	public JPanel description;
	public JPanel about;
	
	ImageIcon image = new ImageIcon("resources/gui/layout/graph.png" );
	ImageIcon image2 = new ImageIcon("resources/gui/layout/graphdesc.png" );
	public WindowFormAbout(){
		initialize();
	}

	
	
	
	private void initialize() {
	
	
		
      
		frame = new JFrame("O programie");
		frame.getContentPane().setBackground(SystemColor.menu);
		

		frame.validate();                // Make sure layout is ok
		
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		frame.setSize(400 ,350);
		frame.setLocationRelativeTo(null);
		
		description = new JPanel();
		about = new JPanel();
		
		
		JLabel label1 = new JLabel(image);
		label1.setSize(about.getWidth(),about.getHeight());
		about.add(label1 );
		
		JLabel label2 = new JLabel(image2);
		label1.setSize(description.getWidth(),description.getHeight());
		description.add(label2 );
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.addTab( "Legenda", description );
		tabbedPane.addTab( "O programie", about );
		
		
		frame.getContentPane().add(tabbedPane, BorderLayout.CENTER);
		
		
		// TO DO - resize available, global size px
	
	}
	
}


